package ${package.ServiceImpl};

import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
import ${package.Service}.${table.serviceName};
import ${superServiceImplClassPackage};
import org.springframework.stereotype.Service;

import java.util.List;
import javax.annotation.Resource;
/**
 * ${table.name} ${table.comment} 业务实现类
 * @author ${author}
 * @date ${date}
 * @version V1.0.0
 */
@Service
<#if kotlin>
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {

}
<#else>
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {


      /**
      * ${table.comment} mapper接口
      */
      @Resource
      private ${table.mapperName} ${table.mapperName?uncap_first};

<#--      /**-->
<#--      * sql查询 select-->
<#--      * @author ${author}-->
<#--      * @date ${date}-->
<#--      * @version V1.0.0-->
<#--      * @param sql 查询sql-->
<#--      * @return List<${entity}>-->
<#--      */-->
<#--      @Override-->
<#--      public List<${entity}> selectSql(String sql) {-->
<#--          return ${table.mapperName?uncap_first}.selectSql(sql);-->
<#--      }-->
      /**
      * 增 insert into 表
      * 删 delete from 表
      * 改 update 表
      * @author ${author}
      * @date ${date}
      * @version V1.0.0
      * @param sql 查询sql
      * @return boolean
      */
      @Override
      public boolean dmlSql(String sql) {
          return ${table.mapperName?uncap_first}.dmlSql(sql) > 0 ? true : false;
      }

}
</#if>
